Copy a Formal Module from template and create 2 New module with different name from same template.

Hi All,

We have a Folder name is "Template" where we have kept a formal module template.

whenever we required the same to another locating we are copying that folder along with module and renaming it.  

Now I want the Folder within that I want 2 module with different name.

How I can reuse my template folder and rename with two different formal module.

Kindly help me.

 

Thanks, 


Rahij - Tue Jan 16 21:44:16 EST 2018

Re: Copy a Formal Module from template and create 2 New module with different name from same template.
Mike.Scharnow - Wed Jan 17 04:28:50 EST 2018

You posted in the DXL forum, so you are asking for help on a DXL solution, correct?

Well, you can either create the destination folder manually, using string create(string name, description desc, Folder& f) and then two times copy / paste the template module (using clipCopy(Item i) and clipPaste(Folder folderRef) and rename it  using string rename({Item i|Folder f|Project p|ModName_ modRef}, string name, string description), or you copy/paste the template folder, rename it then copy the template module a second time.

But I'm sure that you have thought of the same solution, where exactly is the problem?

Re: Copy a Formal Module from template and create 2 New module with different name from same template.
Rahij - Thu Jan 18 00:53:17 EST 2018

Mike.Scharnow - Wed Jan 17 04:28:50 EST 2018

You posted in the DXL forum, so you are asking for help on a DXL solution, correct?

Well, you can either create the destination folder manually, using string create(string name, description desc, Folder& f) and then two times copy / paste the template module (using clipCopy(Item i) and clipPaste(Folder folderRef) and rename it  using string rename({Item i|Folder f|Project p|ModName_ modRef}, string name, string description), or you copy/paste the template folder, rename it then copy the template module a second time.

But I'm sure that you have thought of the same solution, where exactly is the problem?

Thanks so much Mike.

Yes that's correct I asking for help on dxl.

Well I have tried the solution which you have mentioned I have done dxl till this part - whenever I am coping the folder, within that folder existing formal module is also coping that is fine for me. Also we are renaming that folder and module with hardcoded prefix and as per user giving input for postfix. That is also working fine.

Now I have to create or copy one more formal module within that folder when that folder is creating and for that I have to rename same as mentioned above, How I can do that. I am giving a example which may help to understand you better : -

Currently Working :

Project  

        Folder 1 (Can Rename as per user's input) - Coping from template

                  Module 1 (Can Rename as per user's input)

 

Expacted Result :

 Project 

          Folder 1 (Can Rename as per user's input)

                     Module 1 (Can Rename as per user's input)

                     Module 2  (Can Rename as per user's input)

 

Re: Copy a Formal Module from template and create 2 New module with different name from same template.
Mike.Scharnow - Thu Jan 18 05:40:58 EST 2018

Rahij - Thu Jan 18 00:53:17 EST 2018

Thanks so much Mike.

Yes that's correct I asking for help on dxl.

Well I have tried the solution which you have mentioned I have done dxl till this part - whenever I am coping the folder, within that folder existing formal module is also coping that is fine for me. Also we are renaming that folder and module with hardcoded prefix and as per user giving input for postfix. That is also working fine.

Now I have to create or copy one more formal module within that folder when that folder is creating and for that I have to rename same as mentioned above, How I can do that. I am giving a example which may help to understand you better : -

Currently Working :

Project  

        Folder 1 (Can Rename as per user's input) - Coping from template

                  Module 1 (Can Rename as per user's input)

 

Expacted Result :

 Project 

          Folder 1 (Can Rename as per user's input)

                     Module 1 (Can Rename as per user's input)

                     Module 2  (Can Rename as per user's input)

 

Well, I still don't see the problem. 

 

 

Source:

Project_with_Template

     Folder 1

          Module 1

 

Step 1: copy the structure

Target:

Destination_Project

     Folder 1

          Module 1

 

Step 2: rename Folder

Target:

Destination_Project

     Folder_as_user_wants_it

          Module 1

 

Step 3: rename Module

Target:

Destination_Project

     Folder_as_user_wants_it

          Module 1 _ Number_1_as_user_wants_it

 

Step 4: copy Module1 again from Source (/Project_with_Template/Folder 1/Module 1) to Destination Folder (/Destination_Project/Folder_as_user_wants_it)

Target:

Destination_Project

     Folder_as_user_wants_it

          Module 1 _ Number_1_as_user_wants_it

          Module 1

 

Step 5: rename second Module 1 

Target:

Destination_Project

     Folder_as_user_wants_it

          Module 1 _ Number_1_as_user_wants_it

          Module 1_Number_2_as_user_wants_it